package com.fzy.core.tags;

import com.fzy.core.utils.NumberUtils;
import com.fzy.core.utils.StringUtils;

public class TagUtils {
	public static int toIntWidth(String width, int defaultWidth){
		int widthNum = defaultWidth;
		if(!StringUtils.isBlank(width)){
			if(width.endsWith("px")){
				width = StringUtils.removeEnd(width, "px");
			}
			width = StringUtils.trim(width);
			widthNum = NumberUtils.toInt(width, widthNum);
		}
		return widthNum;
	}
}
